package com.gxa.autoparts.core.common;

/**
 * 异常状态编码(code)和信息(message)枚举
 *
 * @author R
 * @data 2021-09-15 15:23
 */
public enum ExceptionCode {

    //枚举就是类型，枚举中的值是先声明好的，直接用
    //枚举中同样可以声明字段和方法和bean方法和构造方法
    //枚举中的值一般用全大写的英文单词组合
    SERVER_FAILED("50000", "服务器小差，稍后重试"),
    LOGIN_FAILED("50001", "登录失败，检查用户名和密码"),
    DUPLICATE_USERNAME("50002", "用户名重复"),
    NO_ID("50003", "查无此数据！"),
    INFO_ERROE("51011", "系统消息异常！"),
    NO_NEW("51101", "没有该消息！"),
    NO_PEOPLE("50004", "人都没有查个屁，快去拉人！"),
    NO_PERSON("50005", "都没这个人你删除啥啊你！？"),
    PHONE_EXIST("50006", "电话号码已存在"),
    PHONE_BAD("50007", "手机号格式错误"),
    SEND_SMS_FAILED("50008", "短信发送失败，请稍后重试"),
    WRONG_TOKEN("50009","暂无权限，请先登录"),
    PHONE_NOT_REG("50010","手机号未注册"),
    STATE_EXIST("50011","商品规格信息异常，请联系管理员"),
    XIEYI_EXIST("50012","已经存在了，看着点儿添加好吗？"),
    SECONDKILL_FAILED("50013","名额已被抢光"),
    LOCK_FAILED("50014","秒杀失败,稍后重试!"),
    DELETE_FAILED("50015","该用户是最后一个超管，无法删除！"),
    DELETE_ROLE_FAILED("5001700","该角色已分配管理员，请先行删除管理员"),
    NO_ROLE_ID("5001701","该管理员未分配角色"),
    PWD_CHECK_FAILED("50016","两次密码不一致，请确认！"),
    OLDPWD_CHECK_FAILED("50017","原密码输入错误，请确认！"),
    WASTER_ERROE("50015","您还没有被分配小区，请联系管理员"),
    PHONE_PWD_WRONG("50020","手机号或密码错误,请重试"),
    DOUBLEPWD_WRONG("50021","两次密码不一致,请重试"),
    QUJIANCODE_WRONG("50022","取件码错误"),
    ALTER_WRONG("50023","操作失败，请稍后再试"),
    BALANCE_LOW("500244","余额不足！"),

    TOKEN_INVALID("500182","无效token!"),
    USERTYPE_ERROR("51001","非临创用户"),
    POINT_ERROR("51002","积分不足"),
    GOODNUM_ERROR("51003","库存数目不足"),
    WAIT("51004","稍后重试"),
    LEVEL_ERROR("51005","等级异常，请联系管理员"),
    ORDER_ERROR("51006","订单信息异常，请联系管理员"),
    RECYCLER_ERROR("51007","回收员Id不能为空，请联系管理员"),
    RECYCLERORDER_ERROR("51008","回收订单信息异常不，请联系管理员"),
    LOCATION_WRONG("50016","地址不在服务范围内（数据表中无该地址）"),
    TIME_EXCCEPTION("5017","时间异常"),
    ADMIN_EXIST("10001","管理员用户名已存在"),
    PWD_WRONG("10002","用户名或密码错误"),
    ROLE_NOT_EXIST("10003","该角色不存在"),
    CAN_NOT_UPDATE("10004","超管权限无法修改"),
    MONEY_BUZU("20001","用户积分余额不足！！！"),
    XIAOQU_NULL("20002","该地区没有没有小区被开发"),
    NOFIND_GOODS("20003","没有该商品！！"),
    NOFIND_XIAOQU("20004","没有该小区！！"),
    YIJIN_QIANDAO("20005","已经签到了"),
    NOTADD_ITEM("30002","未添加出库物资"),
    OUT_OF_STOCK("30003","库存不足"),
    ID_NULL("52001","数据为空"),
    NO_COMMENT("40002","暂无评论"),
    NO_USER_PLACE("40001","当前用户无地址，或者没有该周期时间"),
    STAND_EXCEP("51010","商品规格异常，请稍后再试！"),

    WRONG_ROLE_DESC("60001","角色描述错误"),
    WRONG_ROLE_ADMIN_ID("60002","该管理员已经分配角色，不能重复分配"),
    WRONG_STATE("60003","没有该状态"),
    WRONG_ADMIN_STATE("60004","状态错误"),
    WRONG_ADMINROLE("60005","该管理员无角色"),
    WRONG_NO_PERMISSION("60006","该角色暂时没有分配权限"),
    WRONG_NO_MESSAGE("60007","暂时没有待发送的消息"),
    WRONG_FINISHSENDMESSAGE("60008","消息以完成发送"),
    NOT_TO_Time("600091","未到秒杀时间"),
    IS_EXIST("6000112","申请已经提交，请勿重复提交"),

    WRONG_ADMINPWD("60009","管理员的密码不一致，或为空，或密码错误"),
    REPEAT_SUBMISSION("70021","请勿重复秒杀");



    
    private String code;
    private String message;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    ExceptionCode(String code, String message) {
        this.code = code;
        this.message = message;
    }
}
